Release 10.1A: OpenEdge Deployment:
Managing 4GL Applications
Factors that affect r-code size
You can affect r-code size by how you write your 4GL, depending on the r-code segment. The action code and initial value segments are among the most tunable.
Action code segment
You can reduce the size of an action code segment (for either the main procedure or an internal procedure) by consolidating multiple 4GL statements into one. This can also increase the speed of execution, because the interpreter executes only one action instead of several.
For example, you can reduce action code size by combining several consecutive assignment statements into one
ASSIGNstatement. The following examples require the same amount of expression code:
Note: The compiler creates up to four main action code segments, as needed. If, during compilation, the main action code segments exceed the total size of all four segments, the compilation fails.
Initial value segment
You can reduce the size of the initial value segment by limiting the number of
SHAREDvariables that are accessed in a procedure. The r-code required to support aSHAREDvariable is larger than the r-code to support aNEWSHAREDvariable. OpenEdge uses approximately 36 additional bytes in the initial value segment to resolve eachSHAREDvariable at run time. This value can change depending on the environment.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |